package org.hrds.rdupm.harbor.infra.feign.fallback;

import java.util.List;
import java.util.Set;

import org.hrds.rdupm.harbor.api.vo.ExternalTenantVO;
import org.hrds.rdupm.harbor.infra.feign.BaseFeignClient;
import org.hrds.rdupm.harbor.infra.feign.IamFeignClient;
import org.hrds.rdupm.harbor.infra.feign.dto.ProjectDTO;
import org.hrds.rdupm.harbor.infra.feign.dto.UserDTO;
import org.hrds.rdupm.harbor.infra.feign.dto.UserWithGitlabIdDTO;
import org.hrds.rdupm.util.ExceptionConstants;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import io.choerodon.core.exception.CommonException;

/**
 * BaseFeignClientFallBack
 *
 * @author chenxiuhong
 */
@Component
public class IamFeignClientFallBack implements IamFeignClient {

    @Override
    public ResponseEntity<UserDTO> query(String loginName) {
        throw new CommonException(ExceptionConstants.FeignCode.RDUPM_FEIGN_USER_SELECT);
    }

    @Override
    public ResponseEntity<List<UserDTO>> listUsersByIds(Long[] ids, Boolean onlyEnabled) {
        throw new CommonException(ExceptionConstants.FeignCode.RDUPM_FEIGN_USER_BATCH_SELECT);
    }

    @Override
    public ResponseEntity<List<UserDTO>> listUsersByLoginNames(String[] loginNames, Boolean onlyEnabled) {
        throw new CommonException(ExceptionConstants.FeignCode.RDUPM_FEIGN_USER_BATCH_SELECT);
    }

    @Override
    public ResponseEntity<ExternalTenantVO> queryTenantByIdWithExternalInfo(Long organizationId) {
        throw new CommonException(ExceptionConstants.FeignCode.RDUPM_FEIGN_EXTERNAL_TENANT);
    }
}
